package com.ruoyi.admin.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 文档表
 * </p>
 *
 * @author
 * @since 2025-01-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("llm_documents")
public class LlmDocuments implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(name = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @Schema(name = "上传类型")
    private String uploadType;

    @Schema(name = "内容")
    private String content;

    @Schema(name = "知识库ID")
    private String datasetCode;

    @Schema(name = "业务元数据")
    @TableField(value = "business_data")
    private String businessData;


    // auto 自动 custom 自定义
    @Schema(name = "处理规则")
    private String processRule = "auto";

    @Schema(name = "分块数量")
    private Integer segmentsCount;

    // 0 禁用 1 启用
    @Schema(name = "启用状态")
    private Integer enabled = 1;

    // 0 未删除 1 已删除
    @Schema(name = "伪删除")
    private Integer ifDel = 0;

    @Schema(name = "创建人ID")
    private Long userId;

    @Schema(name = "创建时间")
    private String createTime;

    @Schema(name = "文档单词数")
    private Integer wordCount;

    @Schema(name = "修改时间")
    private String updateTime;

    @Schema(name = "索引方式")
    private String indexingMode = "quality";

    @Schema(name = "PDF章节拆分")
    private Integer chapterSplitting = 0;

    @Schema(name = "Token长度")
    private Integer tokenLength = 500;

    @Schema(name = "分段标识符")
    private String segmentIdentifier = "";

    @Schema(name = "文件类型")
    private String fileType;

    @Schema(name = "业务知识ID")
    private String knowledgeId;

    @Schema(name = "权重")
    private String power;

    @Schema(name = "摘要")
    private String summary;

    @Schema(name = "标签")
    private String tag;

    @Schema(name = "二级分类Code")
    private String category;

    @Schema(name = "文件目录")
    private String catalog;

    @Schema(name = "文件地址")
    private String fileUrl;

    @Schema(name = "显示地址")
    private String showUrl;

    @Schema(name = "切片方式")
    private String sliceMethod = "default";

    // 注意：只有当sliceMethod 为 regex 时生效
    @Schema(name = "切片格式")
    private String sliceRegex;

    @Schema(name = "知识名称")
    private String knowledgeName;

    @Schema(name = "执行日期")
    private String startTime;

    @TableField(value = "tree_id")
    private String treeId;

    @TableField(value = "vector1")
    private String vector1;

    @TableField(value = "vector2")
    private String vector2;

    @TableField(value = "vector3")
    private String vector3;

    @TableField(value = "vector4")
    private String vector4;


    @TableField(value = "clear_level")
    private String clearLevel;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String createBy;


    /**
     * 处理状态 1 待处理 2 处理中 3 处理成功 4 处理失败
     */
    @TableField(value = "status")
    private int status;

    @TableField(value = "error_message")
    private String errorMessage;

    @Schema(name = "文件大小")
    @TableField(value = "file_size")
    private Long fileSize;
}
